/*
 * @Author: your name
 * @Date: 2021-08-31 10:03:40
 * @LastEditTime: 2021-09-02 15:27:05
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \weplus_weibao\src\store\mutations.js
 */
import {
    SET_IS_INIT,
    SET_IS_LOGIN,
    SET_USER_ENTERPRISE,
    SYSTEM_MESSGAE_PREVIEW,
    SET_SYSTEM_REPAIR_TYPE,
    SET_SYSTEM_SOLUTION_MODE,
    SET_SYSTEM_SERVICE_MODE,
    SET_USER_ROLES,
    SET_USER_INFO,
    SET_CONTENT_CONFIG
} from './mutation-types.js';

export default {
    [SET_IS_LOGIN] (state, payload) {
        state.islogin = payload;
    },
    [SET_USER_INFO] (state, payload) {
        state.userinfo = payload;
    },
    [SET_IS_INIT] (state, payload) {
        state.isinit = payload;
    },
    [SET_USER_ENTERPRISE] (state, payload) {
        state.user_enterprises = payload.user_enterprises;
    },
    [SYSTEM_MESSGAE_PREVIEW] (state, payload) {
        state.system_message_priview_number = payload.messagenumber;
        state.system_message_priview_data = payload.messagedata;
    },
    [SET_SYSTEM_REPAIR_TYPE] (state, payload) {
        state.repair_types_map = payload;
    },
    [SET_SYSTEM_SOLUTION_MODE] (state, payload) {
        state.solution_mode_map = payload;
    },
    [SET_SYSTEM_SERVICE_MODE] (state, payload) {
        state.service_mode_map = payload;
    },
    [SET_USER_ROLES] (state, payload) {
        state.roles = payload;
    },
    [SET_CONTENT_CONFIG] (state, payload) {
        state.content_config = payload;
    }

};
